add_rules("mode.debug", "mode.release")
--    add_cxflags("-Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wstrict-aliasing=1", {force = true})

option("posix_dir")
	add_cincludes("dirent.h", "unistd.h", "sys/stat.h")
	add_cfuncs("mkdir", "rmdir", "readdir", "opendir", "closedir", "access")
	add_defines("HAS_POSIX_DIR_API=1")

option("posix_pthread")
	add_cincludes("pthread.h")
	add_links("pthread")
	add_defines("HAS_POSIX_THREAD=1")

target("kfa_writer")
    add_options("posix_dir", "posix_pthread")
    set_kind("binary")
    set_languages("c++11")
    add_deps("libkfa")
    add_links("libkfa")
    add_files("./*.cpp", "./*.c")